home *** CD-ROM | disk | FTP | other *** search
/ Enter 2006 July / Enter 07 2006.iso / Internet / Feedreader 3.02 / FeedReader302Setup.exe / {app} / stylesheet / atom.xsl next >
Encoding:
Extensible Markup Language  |  2006-05-12  |  5.1 KB  |  215 lines

  1. ∩╗┐<?xml version="1.0" ?>
  2.  
  3. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  4.                 xmlns:feed="http://www.w3.org/2005/Atom"
  5.                 xmlns:fr="http://www.feedreader.com/ns/3.0"
  6.                 version="1.0">
  7. <xsl:output method="html" />
  8.  
  9. <xsl:template match="/">
  10.  
  11. <html>
  12.   <head>
  13.     <title><xsl:value-of select="/feed:feed/feed:title"/></title>
  14.     <link rel="stylesheet" href="atom.css"/>
  15.     <style>
  16.  
  17. body {
  18.  font-family: verdana, tahoma;
  19.  font-size: 0.7em;
  20.  line-height: 1.3em;
  21.  padding: 0;
  22.  margin: 0;
  23. }
  24.  
  25.  
  26. a, a:link, a:active, a:visited {
  27.  text-decoration: none;
  28.  color: #0088ff;
  29. }
  30.  
  31. div.entry {
  32.  padding: 0 20px 20px 25px;
  33.  border-bottom: 1px solid #ddd;
  34. }
  35.  
  36. div.content img {
  37. }
  38.  
  39. div.active {
  40.  background-color: #f1f5fa;;
  41. }
  42.  
  43. .read .title a {
  44.  color: #aaa;
  45. }
  46.  
  47.  
  48. .read .content {
  49.  color: #555;
  50. }
  51.  
  52. div.entry .read .title a {
  53.  color: gray;
  54. }
  55.  
  56. .header {
  57.  padding-top: 20px;
  58.  margin: 0 0 0.2em 0;
  59. }
  60.  
  61. .title {
  62.  font-size: 1.6em;
  63.  font-family: arial, verdana, tahoma;
  64.  font-weight: bold;
  65.  letter-spacing: -1px;
  66.  line-height: 1.1em;
  67. }
  68.  
  69. div.details {
  70.  color: gray;
  71.  margin-bottom: 0.5em;
  72. }
  73.  
  74. span.modified, span.author, span.category {
  75. }
  76.  
  77. .status a {
  78.  display:block;
  79.  line-height: 0;
  80.  font-size: 0;
  81.  width: 8px; 
  82.  height: 8px;
  83.  float: right;
  84.  margin-top: -1.5em;
  85.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/unread_8x8.png');
  86.  background-repeat: no-repeat;
  87. }
  88.  
  89. .read .status a {
  90.  background-image: url('<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/read_8x8.png');
  91. }
  92.  
  93.  
  94.  
  95.  
  96.  
  97. </style>
  98.     
  99.  
  100.   </head>    
  101.   <body>
  102.   <script type="text/javascript">
  103.   var imagebase='file://<xsl:value-of select="/feed:feed/fr:imagebase"/>';
  104.   </script>
  105.   <xsl:apply-templates select="feed:feed"/>
  106.   </body>
  107. </html>
  108. </xsl:template>
  109.  
  110. <xsl:template match="feed:feed">
  111.   <xsl:apply-templates select="feed:entry"/>
  112. </xsl:template>
  113.  
  114. <xsl:template match="feed:entry">
  115.           <base>
  116.               <xsl:attribute name="href"><xsl:value-of select = "feed:source/feed:link[@rel='alternate'][1]/@href"/>/</xsl:attribute>
  117.             </base>
  118.     <div class="entry">
  119.         <xsl:attribute name="id">article<xsl:value-of select="fr:item_id"/></xsl:attribute>
  120.         <xsl:if test="fr:rtlEnabled = 1">
  121.             <xsl:attribute name="style">direction:RTL;</xsl:attribute>
  122.         </xsl:if>
  123.         <xsl:if test="fr:status = 1">
  124.             <xsl:attribute name="class">entry read</xsl:attribute>
  125.         </xsl:if>
  126.                 
  127.         <div class="header">
  128.  
  129.         <span class="title">
  130.             <a>
  131.             <xsl:attribute name="href"><xsl:value-of select="feed:link/@href"/></xsl:attribute>
  132.             <xsl:value-of select="feed:title"/>
  133.             </a>
  134.         </span>
  135.  
  136.           <span class="status">
  137.           <a>
  138.              
  139.           <xsl:attribute name="id">togglelink<xsl:value-of select="fr:item_id"/></xsl:attribute>
  140.             <xsl:attribute name="href">fr:toggleread/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  141.           <xsl:attribute name="onclick">this.blur();</xsl:attribute>
  142.                    
  143.           </a>
  144.           </span>
  145.         </div>
  146.     
  147.                 <div class="details">
  148.              <span class="updated"><xsl:value-of select="fr:updated"/>, </span>        
  149.             <xsl:if test="feed:author"> 
  150.                   <span class="author">
  151.                 <xsl:apply-templates select="feed:author"/>
  152.                 </span>
  153.             </xsl:if>
  154.             <a>
  155.             <xsl:attribute name="href">fr:edittags/<xsl:value-of select="fr:item_id"/></xsl:attribute>
  156.  
  157.             <img>
  158.             <xsl:attribute name="border">0</xsl:attribute>
  159.             <xsl:attribute name="hspace">5</xsl:attribute>
  160.             <xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/tag_edit.png</xsl:attribute>
  161.             </img>
  162.             </a>
  163.                         
  164.             <xsl:if test="feed:category">
  165.                   <span class="category"> 
  166.                   <xsl:apply-templates select="feed:category"/>
  167.                 </span>
  168.                     </xsl:if>
  169.             <xsl:if test="feed:source">
  170.                   <span class="source"> 
  171.                 <a>
  172.                 <xsl:attribute name="href">fr:feed/<xsl:value-of select="feed:source/fr:feed_id"/></xsl:attribute>
  173.                 <xsl:value-of select="feed:source/feed:title"/>
  174.                 </a>
  175.                 <a>
  176.                 <xsl:attribute name="href">
  177.                 <!-- <xsl:for-each select = "feed:source/feed:link[@rel='alternate']"> --> 
  178.                     <xsl:value-of select = "feed:source/feed:link[@rel='alternate'][1]/@href"/> 
  179.                     <!-- </xsl:for-each> -->
  180.                 </xsl:attribute>
  181.                       
  182.             <img>
  183.             <xsl:attribute name="border">0</xsl:attribute>
  184.             <xsl:attribute name="hspace">5</xsl:attribute>
  185.             <xsl:attribute name="src">file://<xsl:value-of select="/feed:feed/fr:imagebase"/>stylesheet/world_go.png</xsl:attribute>
  186.             </img>
  187.                 </a>                                  
  188.                 </span>
  189.                                 
  190.                     </xsl:if>
  191.         </div>
  192.  
  193.     <xsl:if test="feed:content">
  194.         <div class="content">
  195.             <xsl:value-of disable-output-escaping="yes" select="feed:content"/>
  196.         </div>
  197.     </xsl:if>
  198.  
  199.     </div>
  200.  
  201. </xsl:template>
  202.  
  203. <xsl:template match="feed:category">
  204.   <a>
  205.   <xsl:attribute name="href">fr:<xsl:value-of select="./@scheme"/></xsl:attribute>
  206.   <xsl:value-of select="./@term"/>
  207.   </a>, 
  208. </xsl:template>
  209.  
  210. <xsl:template match="feed:author">
  211.   <xsl:value-of select="feed:name"/>, 
  212. </xsl:template>
  213.  
  214. </xsl:stylesheet>
  215.